import React, { Component } from 'react'
interface Props {
  type: string
  size?: number
}
class Icon extends Component<Props, any> {
  constructor(props: Props) {
    super(props)
  }
  getIcon() {
    const { type, size } = this.props
    switch (type) {
      case 'datePicker':
        return (
          <svg className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1788" width={`${size || 12}px`} height={ `${size || 12}px`} style={{ minHeight: `${size || 12}px`, minWidth: `${size || 12}px` }}>
            {/* eslint-disable-next-line max-len */}
            <path d="M848.9 118h-93.5c-8.7 0-15.8-7.1-15.8-15.8V60.6c0-16.3-12.8-30.2-29.2-30.6-17-0.5-30.8 13.1-30.8 30v42.3c0 8.7-7.1 15.8-15.8 15.8H363.3c-8.7 0-15.8-7.1-15.8-15.8V60.6c0-16.3-12.8-30.2-29.2-30.6-17-0.5-30.8 13.1-30.8 30v42.3c0 8.7-7.1 15.8-15.8 15.8h-96.6C98.8 118 37 179.8 37 256.1v599.8C37 932.2 98.8 994 175.1 994h673.7c76.3 0 138.1-61.8 138.1-138.1V256.1c0.1-76.3-61.7-138.1-138-138.1zM97 256.1c0-43.2 35-78.1 78.1-78.1h96.6c8.7 0 15.8 7.1 15.8 15.8v41.7c0 16.3 12.8 30.2 29.2 30.6 17 0.5 30.8-13.1 30.8-30v-42.3c0-8.7 7.1-15.8 15.8-15.8h300.5c8.7 0 15.8 7.1 15.8 15.8v41.7c0 16.3 12.8 30.2 29.2 30.6 17 0.5 30.8-13.1 30.8-30v-42.3c0-8.7 7.1-15.8 15.8-15.8h93.5c43.2 0 78.1 35 78.1 78.1v45.4c0 11.4-9.2 20.6-20.6 20.6H117.6c-11.4 0-20.6-9.2-20.6-20.6v-45.4zM927 856c0 43.2-35 78.1-78.1 78.1H175.1c-43.1 0-78.1-35-78.1-78.1V402.7c0-11.4 9.2-20.6 20.6-20.6h788.9c11.4 0 20.6 9.2 20.6 20.6L927 856z"
              p-id="1789" fill="#F55459"></path>
            <path
              d="M240.3 586.1H306c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30s13.4 30 30 30zM479.2 586.1h65.7c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30 0.1 16.6 13.5 30 30 30zM718.2 586.1h65.7c16.5 0 30-13.4 30-30 0-16.5-13.4-30-30-30h-65.7c-16.5 0-30 13.4-30 30s13.4 30 30 30zM312 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30H312c16.5 0 30-13.4 30-30s-13.4-30-30-30zM551 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30H551c16.5 0 30-13.4 30-30-0.1-16.6-13.5-30-30-30zM789.9 730.1h-65.7c-16.5 0-30 13.4-30 30 0 16.5 13.4 30 30 30h65.7c16.5 0 30-13.4 30-30s-13.4-30-30-30z"
              p-id="1790" fill="#F55459"></path>
          </svg>
        )
      default:
        return null
    }
  }
  render() {
    return this.getIcon()
  }
}
export default Icon
